/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jjsoft.celularessuc.gco.mdl;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 *
 * @author Johnny
 */
@Entity
@Table(catalog = "celularessuc", schema = "")

@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Articulosucursal.findAll", query = "SELECT a FROM Articulosucursal a"),
    @NamedQuery(name = "Articulosucursal.findByIdarticuloSucursal", query = "SELECT a FROM Articulosucursal a WHERE a.idarticuloSucursal = :idarticuloSucursal"),
    @NamedQuery(name = "Articulosucursal.findByStock", query = "SELECT a FROM Articulosucursal a WHERE a.stock = :stock"),
    @NamedQuery(name = "Articulosucursal.findByIdSucursal", query = "SELECT a FROM Articulosucursal a WHERE a.idSucursal = :idSucursal"),
    @NamedQuery(name = "Articulosucursal.findByIdArticulo", query = "SELECT a FROM Articulosucursal a WHERE a.idArticulo = :idArticulo")})
public class Articulosucursal implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer idarticuloSucursal;
    private Integer stock;
    private Integer idSucursal;
    private Integer idArticulo;

    public Articulosucursal() {
    }

    public Articulosucursal(Integer idarticuloSucursal) {
        this.idarticuloSucursal = idarticuloSucursal;
    }

    public Integer getIdarticuloSucursal() {
        return idarticuloSucursal;
    }

    public void setIdarticuloSucursal(Integer idarticuloSucursal) {
        this.idarticuloSucursal = idarticuloSucursal;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Integer getIdSucursal() {
        return idSucursal;
    }

    public void setIdSucursal(Integer idSucursal) {
        this.idSucursal = idSucursal;
    }

    public Integer getIdArticulo() {
        return idArticulo;
    }

    public void setIdArticulo(Integer idArticulo) {
        this.idArticulo = idArticulo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idarticuloSucursal != null ? idarticuloSucursal.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Articulosucursal)) {
            return false;
        }
        Articulosucursal other = (Articulosucursal) object;
        if ((this.idarticuloSucursal == null && other.idarticuloSucursal != null) || (this.idarticuloSucursal != null && !this.idarticuloSucursal.equals(other.idarticuloSucursal))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jjsoft.celularessuc.gco.mdl.Articulosucursal[ idarticuloSucursal=" + idarticuloSucursal + " ]";
    }
    
}
